package com.dks.repository.impl;

import java.util.*;
import com.dks.models.Parent;
import com.dks.mapper.ParentMapper;
import com.dks.repository.IParentRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository
public class ParentRepository implements IParentRepository {

    private ParentMapper parentMapper;

    @Autowired
    public ParentRepository(final ParentMapper parentMapperIn) {
        this.parentMapper = parentMapperIn;
    }

    @Override
    public Integer insert(Parent parent){
        return parentMapper.insert(parent);
    }

    @Override
    public Integer update(Parent parent){
        return parentMapper.update(parent);
    }

    @Override
    public Integer delete(Integer id){
        return parentMapper.delete(id);
    }

    @Override
    public Parent select(Integer id){
        return parentMapper.select(id);
    }

    @Override
    public Integer cntByMap(Map<String,Object> map){
        return parentMapper.cntByMap(map);
    }

    @Override
    public List<Integer> getByMap(Map<String,Object> map){
        return parentMapper.getByMap(map);
    }

    @Override
    public List<Parent> getByMapList(Map<String,Object> map){
        return parentMapper.getByMapList(map);
    }

    @Override
    public Integer updateByCode(Parent parent){
        return parentMapper.updateByCode(parent);
    }

    @Override
    public Parent selectByBfCode(String bfCode){
        return parentMapper.selectByBfCode(bfCode);
    }
}
